package dijkstry_seq;

import java.util.ArrayList;
import java.util.List;

class Vertex implements Comparable<Vertex>
{
    public final String name;
    public List<Edge> adjacencies = new ArrayList<Edge>();
    public double minDistance = Double.POSITIVE_INFINITY;
    public Vertex previous;
    public Vertex(String argName) { name = argName; }
    public String toString() { return name; }
	@Override
	public int compareTo(Vertex other)
	{
	    return Double.compare(minDistance, other.minDistance);
	}
}